﻿#include "qgp/qgp.h"
//#pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"")

using namespace tpl;

extern "C" KAPI void k_mpfprint(kcham byhex);

int main(void)
{
	k_setlv(KLV_ALL);
	k_mesgs("test \n");

	qgRdh* rdh = qgRdh::New("D11", 640, 480, QGSDF_LAYOUT, "test", NULL);

	if (rdh)
	{
		qgStub* stub = rdh->GetStub();

		//qgFreeType* font = qgFreeType::New();

		//
		while (rdh->Run(NULL))
		{
			float adv = stub->GetAdvance();

			if (rdh->Enter())
			{
				//font->WriteFormat(10, 10, 0, "test: %.3f", stub->GetRunFps());

				//
				rdh->Leave();
				rdh->Flush();
			}
		}

		//font->Unload();

		rdh->Unload();
	}

	//k_mpfprint(TRUE);

	return 0;
}
